<?php use_helper('I18N', 'Date') ?>
<?php include_partial('incident/assets') ?>
<?php
unset($form['suggest_box']);
?>
<div id="sf_admin_container">

  <?php include_partial('incident/flashes') ?>

  <div id="sf_admin_header">
    <?php include_partial('incident/form_header', array('ml_incidents' => $ml_incidents, 'form' => $form, 'configuration' => $configuration)) ?>
  </div>

  <div id="sf_admin_content">
<h1 class="etiquette">Modifier incident <?php echo $ml_incidents->getMachineStringFull() ?></h1>
    <?php include_partial('incident/form', array('ml_incidents' => $ml_incidents, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?>
  </div>
<?php //if($sf_user->hasCredential('Slot')): ?>
<h1>Historique des changements</h1>
<table style="clear:both;">
<?php if(count($changements->getRawValue()) < 1): ?>
    <tr><td>Aucun changement enregistré depuis la création !</td></tr>
<?php else: ?>
<?php foreach($changements->getRawValue() AS $_changement): ?>
    <?php foreach($_changement AS $changement): ?>
    <tr><?php echo '<td>' . implode('</td><td>',$changement) . '</td>'; ?></tr>
    <?php endforeach; ?>
<?php endforeach; ?>
<?php endif; ?>
</table>
<?php //endif; ?>
    <script type="text/javascript">
    $(document).ready(function(){
        $('.sf_admin_form_field_sfm_do').detach().appendTo('.sf_admin_form_field_sfm');
        $('.sf_admin_form_field_controler_do').detach().appendTo('.sf_admin_form_field_controler');
    });
    </script>
  <div id="sf_admin_footer">
    <?php include_partial('incident/form_footer', array('ml_incidents' => $ml_incidents, 'form' => $form, 'configuration' => $configuration)) ?>
  </div>
</div>
